<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@include file="/include/public.jspf"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/m-base.css" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/m-common.css" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/p-all.css" />

<script type="text/javascript" src="${path }/js/jquery1.10.2.min.js"></script>
<script type="text/javascript" src="${path }/js/morepaging-receiveplan.js"></script><!-- 分页数据拼接 -->
<script type="text/javascript" src="${path }/js/helper.js"></script>
<script type="text/javascript" src="${path }/js/common/base.js"></script>

<title>魔环金融</title>
</head>
<body>
 <div class="ui_title">
        <a class="ui_back" href="${path }/member/center.htm"><i class="ui_icon_back"></i>返回</a>
        回款计划</div>
    <section class="m-main p_account_loan">
        <ul class="ui_tab_nav ui_tab_num2">
            <li <c:if test="${type eq 1 }">class="select"</c:if>><a href="${path }/receive/receivelist.htm?type=1">待回款</a></li>
            <li <c:if test="${type eq 2 }">class="select"</c:if>><a href="${path }/receive/receivelist.htm?type=2">已回款</a></li>
        </ul>
         <!-- 全部 -->
         <!-- <div class="tab_con">
             <div class="tab_box">
             	<div class="load_list" id="list_more"></div>
             </div> -->
         <div class="loan_box">
            <div class="tab0">
                <div class="content ui_border_b load_list" id="list_more"></div>
                <div class="ui_loadmore_text"><a href="javascript:void(0);" class="more">点击加载更多</a></div>
             </div>
         </div>
    </section>
    
    <script>
  //加载更多--分页
   	var type = "${type}";
   	var isLogin = ${isLogin};
   	if(!isLogin){
   		window.location.href="${path }/user/login/index.jsp";
   	}
       // 加载更多事件绑定
       var page = 2;
       /* $('.more').click(function() {
           
       }); */
       $(document).on('click','.more',function(){
       	reqData(page, '#list_more');
           page++;
       }); 
    	// ajax请求
	function reqData(page, pageSelector) {
		$('.ui_loadmore_text').html('<div class="ui_loading"><div class="bar1"></div><div class="bar2"></div><div class="bar3"></div><div class="bar4"></div><div class="bar5"></div><div class="bar6"></div><div class="bar7"></div><div class="bar8"></div><div class="bar9"></div><div class="bar10"></div><div class="bar11"></div><div class="bar12"></div></div>&nbsp;&nbsp;正在加载');
		$.ajax({
			url : '${path }/receive/list.htm',
			type : 'post',
			data : {
				curPage : page,
				type : type,
			},
			success : function(data) {
				data = $.parseJSON(data);
				addHtml(data);
				if (data.pageCount[0] <= 0) {
					$(pageSelector).hide();
					return;
				} else {
					$(pageSelector).show();
				}
			},
			error : function() {
			}
		})
	}
	// 初始数据
       reqData(1,'#list_more');
    </script>
</body>
</html>